<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<?php
include "conn.php";
$id = $_GET["id"];
$result = mysqli_query($conn, "select name,spec,number,price,producer from materals where id='$id'");
list($a, $b, $c, $d, $e) = mysqli_fetch_array($result);
?>
<form id="form1" name="form1" method="post" action="doupdate.php?id=<?php echo $id ?>">
<table width="336" height="220" border="1" align="center">
  <tr>
    <td colspan="2" align="center" bgcolor="#999999"><span class="STYLE2">更新物资信息</span></td>
  </tr>
  <tr>
    <td width="98" align="center">物资名称：</td>
    <td width="222">
        <input type="text" name="txtname" id="txtname" value="<?php echo $a ?>" >
    </td>
  </tr>
  <tr>
    <td align="center">物资规格：</td>
    <td>
        <input type="text" name="txtspec" id="txtspec" value="<?php echo $b ?>" >
    </td>
  </tr>
  <tr>
    <td align="center">物资数量：</td>
    <td>
        <input type="text" name="txtnumber" id="txtnumber" value="<?php echo $c ?>"/>
    </td>
  </tr>
  <tr>
    <td align="center">物资单价：</td>
    <td>
        <input type="text" name="txtprice" id="txtprice" value="<?php echo $d ?>"/>
    </td>
  </tr>
  <tr>
    <td align="center">生产厂商：</td>
    <td>
        <input type="text" name="txtproducer" id="txtproducer" value="<?php echo $e ?>" >
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" name="submit" id="submit" value="提交" />
      <input type="reset" name="reset" id="reset" value="重置" />
    </td>
  </tr>
</table>
</form>
</body>
</html>